package chap06.task2;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class CopyImage {
    public static void main(String[] args)throws  Exception {
        FileInputStream f1= new FileInputStream("D:\\1.png");
        FileOutputStream f2=new FileOutputStream("1.png");
        byte[] b1=new byte[1024];
        int c2=0;
        while ((c2=f1.read(b1))!=-1){
            f2.write(b1,0,c2);
        }
        f1.close();
        f2.close();
    }
}
